<?php

/**
 * AbetSectionCourse form base class.
 *
 * @method AbetSectionCourse getObject() Returns the current form's model object
 *
 * @package    sfproject
 * @subpackage form
 * @author     Your name here
 */
abstract class BaseAbetSectionCourseForm extends BaseFormPropel
{
  public function setup()
  {
    $this->setWidgets(array(
      'id'                         => new sfWidgetFormInputHidden(),
      'course_Code'                => new sfWidgetFormPropelChoice(array('model' => 'AbetPlanStudy', 'add_empty' => true, 'key_method' => 'getCode')),
      'course_Name'                => new sfWidgetFormPropelChoice(array('model' => 'AbetPlanStudy', 'add_empty' => true, 'key_method' => 'getName')),
      'stu_t'                      => new sfWidgetFormInputText(),
      'total_num_student'          => new sfWidgetFormInputText(),
      'total_num_practical_sec'    => new sfWidgetFormInputText(),
      'total_num_theory_sec'       => new sfWidgetFormInputText(),
      'sec_practical_num'          => new sfWidgetFormInputText(),
      'sec_theory_num'             => new sfWidgetFormInputText(),
      'assign_stu_practical_sec'   => new sfWidgetFormInputText(),
      'unassign_stu_practical_sec' => new sfWidgetFormInputText(),
      'assign_stu_theory_sec'      => new sfWidgetFormInputText(),
      'unassign_stu_theory_sec'    => new sfWidgetFormInputText(),
      'created_at'                 => new sfWidgetFormDateTime(),
      'updated_at'                 => new sfWidgetFormDateTime(),
    ));

    $this->setValidators(array(
      'id'                         => new sfValidatorChoice(array('choices' => array($this->getObject()->getId()), 'empty_value' => $this->getObject()->getId(), 'required' => false)),
      'course_Code'                => new sfValidatorPropelChoice(array('model' => 'AbetPlanStudy', 'column' => 'code', 'required' => false)),
      'course_Name'                => new sfValidatorPropelChoice(array('model' => 'AbetPlanStudy', 'column' => 'name', 'required' => false)),
      'stu_t'                      => new sfValidatorString(array('max_length' => 2, 'required' => false)),
      'total_num_student'          => new sfValidatorInteger(array('min' => -2147483648, 'max' => 2147483647, 'required' => false)),
      'total_num_practical_sec'    => new sfValidatorInteger(array('min' => -2147483648, 'max' => 2147483647, 'required' => false)),
      'total_num_theory_sec'       => new sfValidatorInteger(array('min' => -2147483648, 'max' => 2147483647, 'required' => false)),
      'sec_practical_num'          => new sfValidatorInteger(array('min' => -2147483648, 'max' => 2147483647, 'required' => false)),
      'sec_theory_num'             => new sfValidatorInteger(array('min' => -2147483648, 'max' => 2147483647, 'required' => false)),
      'assign_stu_practical_sec'   => new sfValidatorInteger(array('min' => -2147483648, 'max' => 2147483647, 'required' => false)),
      'unassign_stu_practical_sec' => new sfValidatorInteger(array('min' => -2147483648, 'max' => 2147483647, 'required' => false)),
      'assign_stu_theory_sec'      => new sfValidatorInteger(array('min' => -2147483648, 'max' => 2147483647, 'required' => false)),
      'unassign_stu_theory_sec'    => new sfValidatorInteger(array('min' => -2147483648, 'max' => 2147483647, 'required' => false)),
      'created_at'                 => new sfValidatorDateTime(array('required' => false)),
      'updated_at'                 => new sfValidatorDateTime(array('required' => false)),
    ));

    $this->widgetSchema->setNameFormat('abet_section_course[%s]');

    $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);

    parent::setup();
  }

  public function getModelName()
  {
    return 'AbetSectionCourse';
  }


}
